package qq

import (
	"github.com/Mrs4s/go-cqhttp/cache"
	"github.com/Mrs4s/go-cqhttp/model"
)

/* Signin 签到，随机奖励 */
func Signin(userID int64) (flag, coins int64) {
	if cache.GetRedis().SetSign(userID) {
		coins = random(50, 100)
		model.SetUserCoinsByUserID(userID, coins, "签到")
		flag = 1
	} else {
		flag = 0
		coins = 0
	}
	return
}
